  <%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,java.util.Random"%>

  <% String userid = request.getParameter("userid");%>

 <HTML>
    <HEAD>

    <script LANGUAGE="Javascript" SRC="Images/validate.js"></script>

    <LINK href="styles.css" type="text/css" rel="stylesheet">
    <script LANGUAGE="Javascript" SRC="Images/calender.js"></script>
 <script LANGUAGE="Javascript" SRC="">
		function ChkMandatoryField(F,T){
			var val= F.value;
			if(val==""){alert(T+" is mandatory");return false;}
		}
		function ChkNumField(F,T){
			var val = F.value;
			if(isNaN(val)==true||val==""){alert("Please enter numbers for "+T);return false;}
		}
		function ChkAlphaNumericField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z0-9]{1,250})$/;
			if(!(pattern.test(val)==true)){alert("Please enter alphabets or numbers for "+T);return false;}
		}
		function ChkAlphaField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z ]{1,250})$/;
			if(!(pattern.test(val)==true)){alert("Please enter text for "+T);return false;}
		}
		function ChkEmailField(F,T){
			var val = F.value;
			var pattern = /^([a-zA-Z0-9\_\.]{4,25})$/;
			if(!(pattern.test(val)==true)){alert("Please enter valid email for "+T);return false;}
		}
		function ChkDateField(F,T)
		{
			var val = F.value;
		    var pattern = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
		    if(!(pattern.test(val)==true)){alert("Please enter valid date format (yyyy-mm-dd) for "+T);return false;}
		}
		function validate()
		{
			var frm = document.forms(0);
				if(ChkMandatoryField(frm.Year,'Years in Total Experience')==false) return false;
			
			if(ChkMandatoryField(frm.Months,'Months in Total Experience')==false) return false;
if(ChkMandatoryField(frm.AnnualSalary,'Annual Salary')==false) return false;
if(ChkNumField(frm.AnnualSalary,'Annual Salary')==false) return false;

				if(ChkMandatoryField(frm.KeySkills,'Key Skills')==false) return false;
				if(ChkMandatoryField(frm.ResumeTitle,'Resume Title')==false) return false;
				if(ChkMandatoryField(frm.ResumePath,'Resume Path')==false) return false;
				if(ChkMandatoryField(frm.TextResume,'Text Resume')==false) return false;
						
		}
	</script>
	</HEAD>
	<Body class=Grad>
	<H2 align=center>Update Professional</H2>
	<FORM ACTION="UpdateProfessional1.jsp" OnSubmit="return validate()">
	<TABLE align=center width="50%">

		<TR class="row_title">
	<Td align=center>Professional Information<BR></Td>
</TR>
		<Input type=hidden name='userid' value='<%=userid%>'size=10>
		<TR class=row_odd><TH align="left">TotalExperience
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;
		<select name="Year" value="">
		<option value="">Years</option>
		<option value="0">Fresher</option>
		<script>
			for(var i=1;i<=25;i++){
				document.writeln("<option value="+i+">"+i+"</option>");
			}
		</script>
		</select>
		
		&nbsp;&nbsp;
		<select name="Months" value="">
		<option value="">Months</option>
		<option value="00">00</option>
		<script>
			for(var i=1;i<=11;i++){
				if(i<=9)
					document.writeln("<option value=0"+i+">0"+i+"</option>");
				else{
					document.writeln("<option value="+i+">"+i+"</option>");
				}
			}
		</script>
		</select>
		</TD></TR>

		<TR class=row_odd><TH align="left">Annual Salary
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='AnnualSalary' value=''size=10 onfocus="alert('If You have No Experience Please Provide ZERO In this Field');"> Lakhs
		</TR>

		<TR class=row_odd><TH align="left">Functional Area
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<select name="FunctionalArea">
		<option value="">Select</option>
		<option value="Accounts">Accounts,Finance</option>
		<option value="Banking">Banking,Insurance</option>
		<option value="HR">HR/Administration</option>
		<option value="BPO">ITES/BPO/IPO</option>
		<option value="Marketing">Marketing,Advertising</option>
		<option value="Production">Production,Maintainance</option>
		<option value="Telecom">Telecom</option>
		<option value="IT">Information Technology</option>
		<option value="Application">Application,Programming</option>
		<option value="DBA">DBA,Datawarehousing</option>
		<option value="Mainframe">Mainframe</option>
		<option value="Networking">Network administaration</option>
		<option value="Testing">QA&Testing</option>
		<option value="SystemProgramming">SystemProgramming</option>
		<option value="Medical">Medical/Healthcare</option>
		<option value="InteriorDesign">Architecture,InteriorDesign</option>
		<option value="Media">Media/Entertainment</option>
		</select>
		</TR>
         
		<TR class=row_odd><TH align="left">Company Name
		<FONT COLOR="red"></TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='CompanyName' value=''size=10 onfocus="alert('If You Are a FRESHER No need to Provide Company Name');">
		</TR>

        <TR class=row_odd><TH align="left">Key Skills
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='KeySkills' value=''size=20><br>
		<FONT COLOR="#B1B1B1">Provide your keyskills seperated by commas <br>Example: C,C++,Java,J2EE...</FONT>
		</TR>

		<TR class=row_odd><TH align="left">Resume Title
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<Input type=text name='ResumeTitle' value=''size=50><br>
		<FONT COLOR="#B1B1B1">Provide a title that describes your work experience.<br>
		Example: Fresher from Andhra University looking for a IT job.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MCA Graduate with 5 years work experience in Testing
		</FONT>
		</TR>
	   <TR class=row_odd><TH align="left">Text Resume
		<FONT COLOR="red">*</TH>
		<TD class=row_even>&nbsp;&nbsp;<textarea name='TextResume' class=TextField ></textarea>
		<FONT COLOR="#B1B1B1">Copy and paste your resume in the box</FONT>
		</TR>
			    
        <TR>
		<TH><INPUT TYPE="submit" value='Update' class=Button></TH>
		<TH><INPUT TYPE="reset" value='Clear' class=Button></TH></TR>
		</TABLE>
	<H6 align=center>Fields with <FONT SIZE="" COLOR="red">*</FONT> are mandatory </H6>
	</FORM>
	</BODY>

